package br.com.mtg.movethegarbage.game;

import br.com.mtg.movethegarbage.framework.Graphics;
import br.com.mtg.movethegarbage.graphics.SpriteManager;

public class Player extends Entity
{
	int mapX, mapY;
	public static final int DIRECTION_RIGHT = 0;
	public static final int DIRECTION_LEFT = 1;
	public static final int DIRECTION_UP = 2;
	public static final int DIRECTION_DOWN = 3;

	public Player(float _x, float _y, float width, float height)
	{
		super(_x, _y, width, height);
		mapX = 0;
		mapY = 0;
	}

	@Override
	public void draw(Graphics graphics)
	{
		SpriteManager spriteManager = new SpriteManager(graphics, 1);
		spriteManager.beginDraw(Assets.tex_sprites);
		spriteManager.drawSprite(x, y, w, h, entitySprite);
		spriteManager.endDraw();
	}
	
	public void mapMoveTo(float _x, float _y)
	{
		mapX = (int) _x;
		mapY = (int) _y;
	}
	
	public void mapMove(float _x, float _y)
	{
		mapX += _x;
		mapY += _y;
	}
}
